<?php
/**
 * +--------------------------------------------------------+
 * @Created by PhpStorm.
 * @Category store.php
 * @Depiction:
 * Author: hwy
 * Date: 2021/2/1  17:20
 * +--------------------------------------------------------+
 */

namespace App\Http\Requests\Tag;


use App\Http\Requests\BaseRequestsPost;

class Store extends BaseRequestsPost
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name' => 'required',
            'sort' => 'required',
        ];
    }

    /**
     * 定义字段名中文
     *
     * @return array
     */
    public function attributes()
    {
        return [
            'name' => '名称',
            'sort' => '排序',
        ];
    }

    public function messages()
    {
        return [
            'name.required' => '名称不能为空',
            'sort.required' => '排序不能为空',
        ];
    }
}
